# Copyright 2021-present StarRocks, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set(LIBRARY_OUTPUT_PATH "${BUILD_DIR}/src/storage")

# where to put generated binaries
set(EXECUTABLE_OUTPUT_PATH "${BUILD_DIR}/src/storage")

if (CLANG_TIDY_PATH)
    set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_PATH}")
endif()

add_subdirectory(rowset)

add_library(Storage STATIC
    aggregate_type.cpp
    base_tablet.cpp
    decimal12.cpp
    decimal_type_info.cpp
    delete_handler.cpp
    del_vector.cpp
    delta_column_group.cpp
    key_coder.cpp
    memtable_flush_executor.cpp
    segment_flush_executor.cpp
    segment_replicate_executor.cpp
    metadata_util.cpp
    kv_store.cpp
    local_tablet_reader.cpp
    publish_version_manager.cpp
    olap_common.cpp
    olap_define.cpp
    olap_server.cpp
    options.cpp
    page_cache.cpp
    persistent_index.cpp
    primary_index.cpp
    primary_key_encoder.cpp
    protobuf_file.cpp
    replication_txn_manager.cpp
    replication_utils.cpp
    segment_stream_converter.cpp
    rowset_update_state.cpp
    rowset_column_update_state.cpp
    update_compaction_state.cpp
    version_graph.cpp
    storage_engine.cpp
    data_dir.cpp
    short_key_index.cpp
    snapshot_manager.cpp
    snapshot_meta.cpp
    tablet.cpp
    tablet_manager.cpp
    tablet_meta.cpp
    tablet_meta_manager.cpp
    tablet_index.cpp
    tablet_schema.cpp
    tablet_schema_map.cpp
    tablet_updates.cpp
    txn_manager.cpp
    types.cpp
    update_manager.cpp
    utils.cpp
    compaction_utils.cpp
    rowset/array_column_iterator.cpp
    rowset/array_column_writer.cpp
    rowset/binary_plain_page.cpp
    rowset/bitmap_index_reader.cpp
    rowset/bitmap_index_writer.cpp
    rowset/bitshuffle_page.cpp
    rowset/bitshuffle_wrapper.cpp
    rowset/column_iterator.cpp
    rowset/json_column_iterator.cpp
    rowset/json_column_writer.cpp
    rowset/column_reader.cpp
    rowset/column_writer.cpp
    rowset/column_decoder.cpp
    rowset/default_value_column_iterator.cpp
    rowset/dictcode_column_iterator.cpp
    rowset/encoding_info.cpp
    rowset/fill_subfield_iterator.cpp
    rowset/scalar_column_iterator.cpp
    rowset/index_page.cpp
    rowset/indexed_column_reader.cpp
    rowset/indexed_column_writer.cpp
    rowset/map_column_writer.cpp
    rowset/map_column_iterator.cpp
    rowset/struct_column_writer.cpp
    rowset/struct_column_iterator.cpp
    rowset/ordinal_page_index.cpp
    rowset/page_io.cpp
    rowset/binary_dict_page.cpp
    rowset/dict_page.cpp
    rowset/binary_prefix_page.cpp
    rowset/segment.cpp
    rowset/segment_writer.cpp
    rowset/segment_rewriter.cpp
    rowset/segment_group.cpp
    rowset/storage_page_decoder.cpp
    rowset/block_split_bloom_filter.cpp
    rowset/bloom_filter_index_reader.cpp
    rowset/bloom_filter_index_writer.cpp
    rowset/bloom_filter.cpp
    rowset/parsed_page.cpp
    rowset/zone_map_index.cpp
    rowset/segment_iterator.cpp
    rowset/segment_options.cpp
    rowset/rowid_range_option.cpp
    rowset/rowset_meta.cpp
    rowset/horizontal_update_rowset_writer.cpp
    task/engine_batch_load_task.cpp
    task/engine_checksum_task.cpp
    task/engine_clone_task.cpp
    task/engine_manual_compaction_task.cpp
    task/engine_storage_migration_task.cpp
    task/engine_alter_tablet_task.cpp
    aggregate_iterator.cpp
    async_delta_writer.cpp
    chunk_helper.cpp
    chunk_iterator.cpp
    column_predicate_cmp.cpp
    column_in_predicate.cpp
    column_not_in_predicate.cpp
    column_null_predicate.cpp
    column_or_predicate.cpp
    column_expr_predicate.cpp
    conjunctive_predicates.cpp
    convert_helper.cpp
    delete_predicates.cpp
    disjunctive_predicates.cpp
    empty_iterator.cpp
    merge_iterator.cpp
    predicate_parser.cpp
    projection_iterator.cpp
    push_handler.cpp
    row_source_mask.cpp
    row_store_encoder.cpp
    row_store_encoder_simple.cpp
    row_store_encoder_factory.cpp
    schema_change.cpp
    schema_change_utils.cpp
    tablet_reader.cpp
    tablet_reader_params.cpp
    table_reader.cpp
    meta_reader.cpp
    lake_meta_reader.cpp
    olap_meta_reader.cpp
    seek_tuple.cpp
    union_iterator.cpp
    unique_iterator.cpp
    column_aggregate_func.cpp
    chunk_aggregator.cpp
    delta_writer.cpp
    memtable.cpp
    base_compaction.cpp
    cumulative_compaction.cpp
    compaction.cpp
    rowset_merger.cpp
    column_predicate_rewriter.cpp
    column_predicate_dict_conjuct.cpp
    compaction_task.cpp
    compaction_utils.cpp
    compaction_manager.cpp
    horizontal_compaction_task.cpp
    vertical_compaction_task.cpp
    compaction_task_factory.cpp
    default_compaction_policy.cpp
    size_tiered_compaction_policy.cpp
    cluster_id_mgr.cpp
    push_utils.cpp
    primary_key_recover.cpp
    local_primary_key_recover.cpp
    lake/async_delta_writer.cpp
    lake/compaction_policy.cpp
    lake/compaction_scheduler.cpp
    lake/compaction_task.cpp
    lake/horizontal_compaction_task.cpp
    lake/delta_writer.cpp
    lake/vacuum.cpp
    lake/general_tablet_writer.cpp
    lake/pk_tablet_writer.cpp
    lake/replication_txn_manager.cpp
    lake/rowset.cpp
    lake/schema_change.cpp
    lake/starlet_location_provider.cpp
    lake/tablet.cpp
    lake/tablet_manager.cpp
    lake/tablet_reader.cpp
    lake/transactions.cpp
    lake/metadata_iterator.cpp
    lake/spark_load.cpp
    lake/update_manager.cpp
    lake/rowset_update_state.cpp
    lake/meta_file.cpp
    lake/lake_primary_index.cpp
    lake/versioned_tablet.cpp
    lake/vertical_compaction_task.cpp
    lake/metacache.cpp
    lake/lake_primary_key_recover.cpp
    binlog_util.cpp
    binlog_file_writer.cpp
    binlog_file_reader.cpp
    binlog_builder.cpp
    binlog_manager.cpp
    binlog_reader.cpp
    lake/update_compaction_state.cpp
    lake/txn_log_applier.cpp
    lake/lake_local_persistent_index.cpp
    persistent_index_compaction_manager.cpp
    persistent_index_tablet_loader.cpp
    lake/lake_local_persistent_index_tablet_loader.cpp
    lake/lake_persistent_index.cpp
    lake/persistent_index_memtable.cpp
    lake/local_pk_index_manager.cpp
    primary_key_dump.cpp
    dictionary_cache_manager.cpp
    inverted/index_descriptor.hpp
    inverted/inverted_index_iterator.cpp
    inverted/inverted_index_iterator.cpp
    inverted/inverted_index_option.cpp
    inverted/inverted_index_common.hpp
    inverted/inverted_plugin_factory.cpp
    inverted/clucene/clucene_plugin.cpp
    inverted/clucene/clucene_roaring_hit_collector.hpp
    inverted/clucene/clucene_inverted_writer.cpp
    inverted/clucene/clucene_inverted_reader.cpp
    inverted/clucene/clucene_inverted_util.hpp
    inverted/clucene/match_operator.cpp)
